package com.android.flickr;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class About extends Activity {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.about);
        
		//create button object from ok button on screen and add listener.
        //all it does it finish the activity.
		Button enterButton = (Button) findViewById(R.id.button_quit_about);
		enterButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				setResult(RESULT_OK);
				finish();
			}
		});
		
		
		//Button callback for Cam.  Displays homepage
		Button camButton = (Button) findViewById(R.id.button_dev1);
		camButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				Uri uri = Uri.parse("http://www.cwebb.us/"); 
				About.this.startActivity(new Intent(Intent.ACTION_VIEW, uri));
			}
		});
		
		//Button callback for Woodsy.  Displays homepage
		Button andrewButton = (Button) findViewById(R.id.button_dev2);
		andrewButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				Uri uri = Uri.parse("http://andrewwoodard.info/"); 
				About.this.startActivity(new Intent(Intent.ACTION_VIEW, uri));
			}
		});
		
		
	}
	
}